#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import group_blueprint
from api_1_0.groupResource.groupResource import GroupResource
from api_1_0.groupResource.groupOtherResource import GroupOtherResource, GroupAddResource

api = Api(group_blueprint)

api.add_resource(GroupResource, '/group/<group_id>', '/group', endpoint='Group')


@group_blueprint.route('/group/update/<group_id>', methods=['PUT'], endpoint='GroupUpdate')
def update(group_id):
    return GroupOtherResource.sensitive_update(group_id)


# 添加班级
api.add_resource(GroupAddResource, '/group/add', endpoint='add_group')
